<?php
include 'config.php';
	$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die ("Could not execute query");
	$query = "SELECT lexid, context1 FROM d3";
	//echo $query;
	$result = mysqli_query($con,$query) or die ("Could not get the user lex information");
	// while ($row = mysqli_fetch_array($result))
    // {
    	// $lextitle = $row['lextitle'];
    	// $lexcontext = $row['lexcontext'] ;
// 		
// print_r($result);
// print_r(json_encode($result));
// 
	// }	
for ($x = 0; $x < mysql_num_rows($result); $x++) {
        $data[] = mysql_fetch_assoc($result);
    }
print_r(json_encode($data));
?>